﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Himp.ShareData;

namespace Himp.Platform
{
    /// <summary>
    /// 公共项目
    /// </summary>
    public class PubItemsQuery : ISingletonDependency
    {
        private readonly IServiceProvider _serviceProvider;

        public PubItemsQuery(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<PagedResultDto<PubItemDto>> GetPubItemListAsync(PubItemInput input)
        {
            var pubItemService = _serviceProvider.GetService<IPubItemService>();

            return await pubItemService.GetListAsync(input);
        }
    }
}
